package ${rootPackageName};
import java.io.IOException;
import mobile.game.core.InputStream;
import mobile.game.core.gen.JowGenFile;

@JowGenFile
public final class ${rootClassName}{
	public static ${interfaceName} create(int id, InputStream in) throws IOException {
		switch(id){
			<#list methodsList as m>
			case ${m.id}:
				<#if m.hasCreate>
				return ${m.className}.create(in);
				<#else>
				return new ${m.className}();
				</#if>
			</#list>
		}
		return null;
	}
	public static void init(){
		InputStream.setCreateCommonFunc(${rootClassName}::create);
	}
}

